﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace RootfusBuiltinAddins.THist1D
{
    /// <summary>
    /// Interaction logic for THist1DUIConfig.xaml
    /// </summary>
    public partial class THist1DUIConfig : UserControl
    {
        public THist1DUIConfig(THist1DAddIn myparent)
        {
            InitializeComponent();

            ///
            /// Bind commands we understand
            /// 

            CommandBindings.Add(new CommandBinding(
                ApplicationCommands.Save,
                (sender, e) => myparent.Save()));
            CommandBindings.Add(new CommandBinding(
                ApplicationCommands.SaveAs,
                (sender, e) => myparent.SaveAs()));

            ///
            /// Set the slider max for rebinning
            /// 

            rebin.Maximum = myparent.NumberOfBins;
        }
    }
}
